<template>
  <div class="app">
    <div class="tabbar">
        <div class="btns" @click="current(index)" :class="{active:currentIndex==index}" v-for="(item,index) in list" :key="index
        ">{{item}}</div>
    </div>
  </div>
</template>

<script>
export default {
data(){
    return {
        currentIndex:0,
        list:["首页","爆爆团","订单","我的"]
    }
},
methods:{
    current(index){
        this.currentIndex=index
    }
}
}
</script>

<style>
.tabbar{
    width: 100%;
    display: flex;
    position: fixed;
    bottom: 0;
    background-color: white;
    border-top: 1px solid rgb(182, 180, 180);
    justify-content: space-around;
}
.btns{
    height: 50px;
    text-align: center;
    line-height: 50px;
    font-size: 18px;
}
.active{
    color: orangered;
}
</style>